import pandas as pd
import requests


def get_rank_list() -> pd.DataFrame:

    url = "https://emappdata.eastmoney.com/stockrank/getAllCurrentList"
    params = {
    "appId": "appId01",
    "globalId": "786e4c21-70dc-435a-93bb-38",
    "pageNo": 1,
    "pageSize": 100
    }
    r = requests.post(url, json=params)
    temp_df = pd.DataFrame(r.json()["data"])
    return temp_df
   

if __name__ == '__main__':
    pd.set_option('display.unicode.ambiguous_as_wide', True)
    pd.set_option('display.unicode.east_asian_width', True)
    pd.set_option('display.max_rows', None)
    df = get_rank_list()
    print(df)